package com.example.service.wechat;

import com.example.pojo.web.Result;
import com.example.pojo.wechat.Order;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName OrderService
 * @Description: com.example.service.wechat
 * @Auther: xiwd
 * @Date: 2022/4/19 - 04 - 19 - 0:21
 * @version: 1.0
 */
public interface OrderService {
    //methods
    /**
     * 根据openid和status订单状态查询是否存在未完成的订单
     * @param openid
     * @param status
     * @return
     */
    public abstract Order selectOrderByOpenId_Status(String openid, Integer status);


    /**
     * 根据id查询订单
     * @param id
     * @return
     */
    public abstract Order selectOrderById(@Param(value = "id")Integer id);


    /**
     * 根据code查询订单
     * @param code
     * @return
     */
    public abstract Result selectOrderByOpenId(String code);

    /**
     * 根据订单编号更新订单状态
     * @param id
     * @return
     */
    public abstract Result updateOrderStatusById(Integer id,Integer status);

    /**
     * 创建新的订单
     * @param code
     * @param markerId
     * @return
     */
    public abstract Result addOrder(String code, Integer markerId);


}
